/**
 * Copyright 2025 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.eval-container {
  margin-top: 20px;
  padding-left: 25px;
  padding-right: 25px;
}

.eval-case-id {
  cursor: pointer;
}

.eval-set-actions {
  display: flex;
  justify-content: space-between;
  color: var(--eval-tab-eval-set-actions-color);
  font-style: normal;
  font-weight: 700;
  font-size: 14px;
}

.empty-eval-info {
  margin-top: 12px;
  background-color: var(--eval-tab-empty-eval-info-background-color);
  border-radius: 8px;
  box-shadow:
    0px 2px 6px 2px var(--eval-tab-empty-eval-info-box-shadow-color1),
    0px 1px 2px 0px var(--eval-tab-empty-eval-info-box-shadow-color2);
}

.info-title {
  color: var(--eval-tab-info-title-color);
  font-family: Roboto;
  font-size: 14px;
  font-weight: 500;
  padding-top: 13px;
  padding-right: 16px;
  padding-left: 16px;
}

.info-detail {
  color: var(--eval-tab-info-detail-color);
  font-family: Roboto;
  font-size: 14px;
  font-weight: 400;
  padding-top: 13px;
  padding-right: 16px;
  padding-left: 16px;
  letter-spacing: 0.2px;
}

.info-create {
  color: var(--eval-tab-info-create-color);
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  padding-right: 16px;
  padding-left: 16px;
  margin-top: 19px;
  padding-bottom: 16px;
  cursor: pointer;
}

.eval-set-row {
  display: flex;
  justify-content: space-between;
  cursor: pointer;
}

.selected-eval-case {
  font-weight: 900;
  color: var(--eval-tab-selected-eval-case-color);
 }

.save-session-btn {
  width: 100%;
  background: linear-gradient(
      0deg,
      var(--eval-tab-save-session-btn-background-color1) 0%,
      var(--eval-tab-save-session-btn-background-color1) 100%
    ),
    var(--eval-tab-save-session-btn-background-color2);
  border: none;
  border-radius: 4px;
  margin-top: 12px;
  cursor: pointer;
}

.save-session-btn-detail {
  display: flex;
  padding-left: 12px;
  padding-right: 16px;
  padding-top: 8px;
  padding-bottom: 8px;
  justify-content: center;
}

.save-session-btn-text {
  padding-top: 2px;
  color: var(--eval-tab-save-session-btn-text-color);
  font-family: 'Google Sans';
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: 20px;
  letter-spacing: 0.25px;
}

.run-eval-btn {
  border-radius: 4px;
  border: 1px solid var(--eval-tab-run-eval-btn-border-color);
  background-color: transparent;
  padding-left: 24px;
  padding-right: 24px;
  padding-top: 8px;
  padding-bottom: 8px;
  margin-top: 16px;
  color: var(--eval-tab-run-eval-btn-color);
  cursor: pointer;

  &:hover {
    background-color: var(--eval-tab-run-eval-btn-hover-background-color);
  }
}

.result-btn {
  display: flex;
  background-color: transparent;
  border-radius: 4px;
  border: 1px solid var(--eval-tab-result-btn-border-color);
  margin-top: 4px;
  cursor: pointer;

  &:hover {
    background-color: var(--eval-tab-result-btn-hover-background-color);
  }

  &.pass {
    color: var(--eval-tab-result-btn-pass-color);
  }

  &.fail {
    color: var(--eval-tab-result-btn-fail-color);
  }
}

.evaluation-tab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.evaluation-history-icon {
  cursor: pointer;
  margin-top: 4px;
}

.status-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: 8px;
  background-color: var(--eval-tab-status-card-background-color);
  padding: 12px 16px;
  margin-top: 12px;

  &__overview {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  &__info {
    // Container for the text content on the left
    display: flex;
    flex-direction: column;
  }

  &__timestamp {
    font-size: 0.9em;
    color: var(--eval-tab-status-card-timestamp-color);
    margin-bottom: 5px;
  }

  &__summary {
    display: flex;
    align-items: center;
    font-size: 0.95em;
    font-weight: 500;
  }

  &__metrics {
    display: flex;
    align-items: center;
    font-size: 0.75em;
    font-weight: 300;
    margin-top: 3px;
  }

  &__metric {
    width: 180px;
    color: var(--eval-tab-status-card-metric-color);
  }

  &__failed {
    color: var(--eval-tab-status-card-failed-color);
  }

  &__separator {
    color: var(--eval-tab-status-card-separator-color);
    margin: 0 8px;
  }

  &__passed {
    color: var(--eval-tab-status-card-passed-color);
  }

  &__action {
    // Container for the icon
    display: flex;
    align-items: center;

    mat-icon {
      color: var(--eval-tab-status-card-action-mat-icon-color);
      cursor: pointer;
      transition: transform 0.2s ease-in-out;

      &:hover {
        opacity: 0.8;
      }
    }

    .status-card__icon {
      color: var(--eval-tab-status-card-icon-color);
      font-size: 1.2em;
      cursor: pointer;
      &:hover {
        opacity: 0.8;
      }
    }
  }

  &__history-cases {
    display: flex;
    flex-direction: column;
    margin-top: 3px;
    justify-content: flex-start;
    width: 100%;
  }

  &__history-case {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-top: 15px;
  }
}

.eval-spinner {
  margin-top: 12px;
}
